import { ecs } from 'db://app-game/libs/ecs/ECS';
import { TableWeapon } from '../../../../table/TableWeapon';
import { WeaponData } from '../../inventory/Inventory.type';

/**
 * 角色装备数据组件
 */
@ecs.register('RoleModelEquipment')
export class RoleModelEquipmentComp extends ecs.Comp {
  private tableWeapon: TableWeapon = new TableWeapon();
  /** 武器 */
  private _weapon: WeaponData;
  public get weapon(): WeaponData {
    return this._weapon;
  }
  public set weapon(value: number) {
    this.tableWeapon.init(value);
    this._weapon = this.tableWeapon.data;
  }
  reset(entity: ecs.Entity): void {}
}
